<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['middleware'=>'checkIp'],function (){
    Route::group(['middleware'=>'checkRequestHead'],function () {
        

        //sn编号查询应用白名单
        Route::get('/app/whiteAppBySnId', 'AppApi@whiteAppBySnId');
        //更新应用白名单
        Route::post('/app/whiteAppUpdate', 'AppApi@whiteAppUpdate');

        //手机验证码登录
        Route::post('/userInfo/codeLogin', 'UserInfoApi@codeLogin');
        //发送手机验证码登录的验证码
        Route::post('/userInfo/getLoginCode', 'UserInfoApi@getLoginCode');

        //登录
        Route::post('/userInfo/login', 'UserInfoApi@login');
        //注册
        Route::post('/userInfo/register', 'UserInfoApi@register');
        //获取个人信息
        Route::get('/userInfo/getUserInfo', 'UserInfoApi@getUserInfo');
        //获取验证码
        Route::post('/userInfo/getSms', 'UserInfoApi@getSms');
        //修改密码
        Route::post('/userInfo/editPassword', 'UserInfoApi@editPassword');
        //修改手机号
        Route::post('/userInfo/editMobile', 'UserInfoApi@editMobile');
        //找回密码
        Route::post('/userInfo/retrievePassword', 'UserInfoApi@retrievePassword');
        //获取家长设备信息
        Route::get('/userInfo/getParentSn', 'UserInfoApi@getParentSn');
        //获取设备信息
        Route::get('/userInfo/getSnInfo', 'UserInfoApi@getSnInfo');
        //获取班级信息
        Route::get('/userInfo/getClassInfo', 'UserInfoApi@getClassInfo');
        //增加班级信息
        Route::post('/userInfo/addClass', 'UserInfoApi@addClass');
        //获取班级sn信息
        Route::get('/userInfo/getClassSnInfo', 'UserInfoApi@getClassSnInfo');
        //编号获取用户信息
        Route::get('/userInfo/queryIdAdmin', 'UserInfoApi@queryIdAdmin');
        //修改设备头像信息
        Route::post('/userInfo/updateAvatar', 'UserInfoApi@updateAvatar');
        //修改设备信息
        Route::post('/userInfo/updateParentSn', 'UserInfoApi@updateParentSn');
        //设备编号获取设备信息
        Route::get('/userInfo/querySnInfo', 'UserInfoApi@querySnInfo');
        //获取年级名称
        Route::get('/sn/querySnGrade','SnApi@querySnGrade');

        //授权信息
        //邀请码获取老师姓名
        Route::get('/parentSn/codeGetUsername', 'ParentSnApi@codeGetUsername');
        //申请授权
        Route::post('/parentSn/applyEmpower', 'ParentSnApi@applyEmpower');
        //获取授权信息
        Route::get('/parentSn/getEmpower', 'ParentSnApi@getEmpower');
        //绑定设备
        Route::post('/parentSn/bindParentSn', 'ParentSnApi@bindParentSn');
        //解除授权
        Route::post('/parentSn/relieveEmpower', 'ParentSnApi@relieveEmpower');
        //获取绑定是否成功
        Route::get('/parentSn/getFlatIsSuccess', 'ParentSnApi@getFlatIsSuccess');
        //解除设备绑定
        Route::post('/parentSn/relieveBindParentSn', 'ParentSnApi@relieveBindParentSn');
        //获取sn的uid
        Route::get('/parentSn/getSnUid', 'ParentSnApi@getSnUid');



        //设备设置
        //增加浏览器网址
        Route::post('/sn/addBrowser', 'SnApi@addBrowser');
        //编辑浏览器网址
        Route::post('/sn/editBrowser', 'SnApi@editBrowser');
        //删除浏览器网址
        Route::post('/sn/deleteBrowser', 'SnApi@deleteBrowser');
        //sn编号获取浏览器信息
        Route::get('/sn/getBrowser', 'SnApi@getBrowser');
        //获取浏览器网址或书签信息
        Route::get('/sn/getBrowserUrlInfo', 'SnApi@getBrowserUrlInfo');
        //sn编号获取系统管控信息
        Route::get('/sn/getSetting', 'SnApi@getSetting');
        //设置系统管控信息
        Route::post('/sn/editSetting', 'SnApi@editSetting');
        //sn编号获取所有应用
        Route::get('/sn/getAppAll', 'SnApi@getAppAll');
        //卸载应用
        Route::post('/sn/appUninstall', 'SnApi@appUninstall');

        //sn编号获取屏幕锁定和截图信息
        Route::get('/sn/querySnIdScreenshot', 'SnApi@querySnIdScreenshot');
        //设备发起截图
        Route::post('/sn/sendScreenshot', 'SnApi@sendScreenshot');
        //设备锁定屏幕和解锁屏幕
        Route::post('/sn/screenIsLock', 'SnApi@screenIsLock');
        //sn编号获取设备时间管控
        Route::get('/sn/queryTimeControl', 'SnApi@queryTimeControl');
        //增加时间管控
        Route::post('/sn/addTimeControl', 'SnApi@addTimeControl');
        //修改时间管控
        Route::post('/sn/updateTimeControl', 'SnApi@updateTimeControl');
        //删除时间管控
        Route::post('/sn/deleteTimeControl', 'SnApi@deleteTimeControl');
        //清除设备截图信息
        Route::post('/sn/deleteScreenshot', 'SnApi@deleteScreenshot');
        //远程管理
        Route::post('/sn/longRangeControl', 'SnApi@longRangeControl');

        //应用信息
        //获取科目信息
        Route::get('/app/getSubject', 'AppApi@getSubject');
        //获取应用信息
        Route::get('/app/getAdminApp', 'AppApi@getAdminApp');
        //获取应用信息详情
        Route::get('/app/getAdminAppDetails', 'AppApi@getAdminAppDetails');
        //应用市场安装
        Route::post('/app/appInstall', 'AppApi@appInstall');
        //应用市场推送
        Route::post('/app/appPush', 'AppApi@appPush');
        //设备每日在线和应用使用信息
        Route::get('/app/querySnLogInfo', 'AppApi@querySnLogInfo');
        //获取应用安装列表
        Route::get('/app/getInstallAppList', 'AppApi@getInstallAppList');

        //刷新
        Route::get('/app/checkRefresh', 'AppApi@checkRefresh');
        //获取应用日志
        Route::get('/app/queryAppLog', 'AppApi@queryAppLog');
        //获取应用统计日志
        Route::get('/app/querySumAppLog', 'AppApi@querySumAppLog');
        //编号获取应用信息
        Route::get('/app/queryIdApp', 'AppApi@queryIdApp');
        //修改应用信息
        Route::post('/app/editAppAll', 'AppApi@editAppAll');
        //获取我的应用
        Route::get('/app/queryParentApp', 'AppApi@queryParentApp');
        //删除我的应用
        Route::post('/app/deleteParent', 'AppApi@deleteParent');
        //清除应用缓存
        Route::post('/app/cleanAppCache', 'AppApi@cleanAppCache');

        //获取应用使用时长统计
        Route::get('/app/getAppUseTimeLog', 'AppApi@getAppUseTimeLog');
        //修改app静默状态
        Route::post('/app/editAppSilent', 'AppApi@editAppSilent');


        
    });
});
